package com.oocl.im.handle.impl;

import com.oocl.im.handle.IHandle;
import com.oocl.im.entity.Protocol;

import java.util.ArrayList;

import com.oocl.im.constants.ClientMaintenance;
import com.oocl.im.constants.Constants;
import com.oocl.im.eventbus.MemberBus;
import com.oocl.im.eventbus.RxBus;

public class SynHandle implements IHandle{
	
	@Override
	public void handle(Protocol protocol) {
		ClientMaintenance.clientList = (ArrayList<Object>) protocol.getParams().get(Constants.LIST);
		Object[] memberLists=  ClientMaintenance.clientList.toArray();
		MemberBus memberBus=new MemberBus(memberLists);
		RxBus.get().post(memberBus);
		
	}

	
}
